package com.woniuxy.controller;

import com.woniuxy.service.CarService;
import com.woniuxy.util.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class CarController {
    @Resource
    private CarService carService;

    @RequestMapping("/car/selectByCampId")
    @CrossOrigin
    public Result selectByCampId(Integer campId) throws Exception{
        return new Result("200","success",null,carService.selectCarByCampId(campId));
    }
}
